package coop.tecso.test.objets.complex;

//src/gen
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.JoinColumns;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.OneToOne;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.persistence.Version;

/**
 *
 */
@Entity
@Table(name = "MANIFEST")
public class Manifest implements java.io.Serializable {
	private static final long serialVersionUID = 1L;
	@Id
	@GeneratedValue(strategy = GenerationType.AUTO, generator = "MANIFEST_SEQ")
	@SequenceGenerator(name = "MANIFEST_SEQ", sequenceName = "MANIFEST_SEQ", allocationSize = 1)
	@Column(name = "MANIFEST_ID", nullable = false)
	private int id;
	@Version
	@Column(name = "VERSION")
	private int manifestversion;

	/**
	 *
	 */
	@Basic(optional = false)
	@Column(name = "ORDER_MA", nullable = false)
	private long orderMa;

	/**
	 *
	 */
	@Basic(optional = false)
	@Column(name = "DEPARTURE_AIRPORT", nullable = false, length = 3)
	private String departureAirport;

	/**
	 *
	 */
	@Basic(optional = false)
	@Column(name = "ARRIVAL_AIRPORT", nullable = false, length = 3)
	private String arrivalAirport;

	/**
	 *
	 */
	@Temporal(TemporalType.DATE)
	@Column(name = "DEPARTURE_DATE")
	private java.util.Date departureDate;

	/**
	 *
	 */
	@Column(name = "DEPARTURE_TIME")
	private java.sql.Timestamp departureTime;

	/**
	 *
	 */
	@Temporal(TemporalType.DATE)
	@Column(name = "ARRIVAL_DATE")
	private java.util.Date arrivalDate;

	/**
	 *
	 */
	@Column(name = "ARRIVAL_TIME")
	private java.sql.Timestamp arrivalTime;

	/**
	 *
	 */
	@Column(name = "KM", length = 5)
	private Integer km;

	/**
	 *
	 */
	@Column(name = "TYPE", length = 1)
	private String type;

	/**
	 *
	 */
	@Column(name = "REGISTRATION_FK", length = 10)
	private String registrationFk;

	/**
	 *
	 */
	@Column(name = "OBSERVATION_DETAIL", length = 250)
	private String observationDetail;

	/**
	 *
	 */
	@Temporal(TemporalType.DATE)
	@Column(name = "RECEPTION_DATE", length = 8)
	private java.util.Date receptionDate;

	/**
	 *
	 */
	@Column(name = "RECEPTION_USR", length = 255)
	private String receptionUsr;

	/**
	 *
	 */
	@Basic(optional = false)
	@Column(name = "SEGMENT_FK", nullable = false, length = 11)
	private String segmentFk;

	/**
	 *
	 */
	@Column(name = "TEC_CREATION_USER", length = 255)
	private String tecCreationUser;

	/**
	 *
	 */
	@Column(name = "TEC_CREATION_TIMESTAMP")
	private java.sql.Timestamp tecCreationTimestamp;

	/**
	 *
	 */
	@Column(name = "TEC_MODIFICATION_TIMESTAMP")
	private java.sql.Timestamp tecModificationTimestamp;

	/**
	 *
	 */
	@Column(name = "TEC_MODIFICATION_USER", length = 255)
	private String tecModificationUser;

	/**
	 *
	 */
	@Column(name = "TEC_DELETED")
	private Boolean tecDeleted;

	/**
	 *
	 */
	@Column(name = "MANIFEST_FREIGHT_FK", length = 10)
	private Integer manifestFreightFk;

	/**
	 *
	 */
	@Column(name = "MANIFEST_OBSERVATION_FK", length = 8)
	private String manifestObservationFk;

	/**
	 *
	 */
	@OneToMany(targetEntity = ManifestStHs.class, mappedBy = "manifest", fetch = FetchType.LAZY)
	private java.util.Set<ManifestStHs> manifestStHs = new java.util.HashSet<ManifestStHs>();

	/**
	 *
	 */
	@OneToMany(targetEntity = ManifestCouponFlown.class, mappedBy = "manifest", fetch = FetchType.LAZY)
	private java.util.Set<ManifestCouponFlown> manifestCouponFlown = new java.util.HashSet<ManifestCouponFlown>();

	/**
	 *
	 */
	@ManyToOne(targetEntity = FlightOperated.class, optional = false, fetch = FetchType.LAZY)
	@JoinColumns({ @JoinColumn(name = "FLIGHT_OPERATED_FK", referencedColumnName = "FLIGHT_OPERATED", nullable = false) })
	private FlightOperated flightOperated;

	/**
	 *
	 */
	@OneToOne(targetEntity = ManifestTotal.class, mappedBy = "manifest", fetch = FetchType.LAZY)
	@JoinColumns({ @JoinColumn(name = "MANIFEST_TOTAL_FK", referencedColumnName = "MANIFEST_TOTAL_ID") })
	private ManifestTotal manifestTotal;

	/**
	 *
	 */
	@OneToOne(targetEntity = ManifestSt.class, mappedBy = "manifest", fetch = FetchType.LAZY)
	@JoinColumns({ @JoinColumn(name = "MANIFEST_ST_FK", referencedColumnName = "MANIFEST_ST_ID") })
	private ManifestSt manifestSt;

	public Manifest() {
	}

	// Constructor for primary key
	public Manifest(int id) {
		this.id = id;
	}

	/**
	 * Autogenerated key
	 */
	public int getId() {
		return id;
	}

	public int getManifestversion() {
		return manifestversion;
	}

	public void setManifestversion(int manifestversion) {
		this.manifestversion = manifestversion;
	}

	public long getOrderMa() {
		return orderMa;
	}

	public void setOrderMa(long orderMa) {
		this.orderMa = orderMa;
	}

	public String getDepartureAirport() {
		return departureAirport;
	}

	public void setDepartureAirport(String departureAirport) {
		this.departureAirport = departureAirport;
	}

	public String getArrivalAirport() {
		return arrivalAirport;
	}

	public void setArrivalAirport(String arrivalAirport) {
		this.arrivalAirport = arrivalAirport;
	}

	public java.util.Date getDepartureDate() {
		return departureDate;
	}

	public void setDepartureDate(java.util.Date departureDate) {
		this.departureDate = departureDate;
	}

	public java.sql.Timestamp getDepartureTime() {
		return departureTime;
	}

	public void setDepartureTime(java.sql.Timestamp departureTime) {
		this.departureTime = departureTime;
	}

	public java.util.Date getArrivalDate() {
		return arrivalDate;
	}

	public void setArrivalDate(java.util.Date arrivalDate) {
		this.arrivalDate = arrivalDate;
	}

	public java.sql.Timestamp getArrivalTime() {
		return arrivalTime;
	}

	public void setArrivalTime(java.sql.Timestamp arrivalTime) {
		this.arrivalTime = arrivalTime;
	}

	public Integer getKm() {
		return km;
	}

	public void setKm(Integer km) {
		this.km = km;
	}

	public String getType() {
		return type;
	}

	public void setType(String type) {
		this.type = type;
	}

	public String getRegistrationFk() {
		return registrationFk;
	}

	public void setRegistrationFk(String registrationFk) {
		this.registrationFk = registrationFk;
	}

	public String getObservationDetail() {
		return observationDetail;
	}

	public void setObservationDetail(String observationDetail) {
		this.observationDetail = observationDetail;
	}

	public java.util.Date getReceptionDate() {
		return receptionDate;
	}

	public void setReceptionDate(java.util.Date receptionDate) {
		this.receptionDate = receptionDate;
	}

	public String getReceptionUsr() {
		return receptionUsr;
	}

	public void setReceptionUsr(String receptionUsr) {
		this.receptionUsr = receptionUsr;
	}

	public String getSegmentFk() {
		return segmentFk;
	}

	public void setSegmentFk(String segmentFk) {
		this.segmentFk = segmentFk;
	}

	public String getTecCreationUser() {
		return tecCreationUser;
	}

	public void setTecCreationUser(String tecCreationUser) {
		this.tecCreationUser = tecCreationUser;
	}

	public java.sql.Timestamp getTecCreationTimestamp() {
		return tecCreationTimestamp;
	}

	public void setTecCreationTimestamp(java.sql.Timestamp tecCreationTimestamp) {
		this.tecCreationTimestamp = tecCreationTimestamp;
	}

	public java.sql.Timestamp getTecModificationTimestamp() {
		return tecModificationTimestamp;
	}

	public void setTecModificationTimestamp(java.sql.Timestamp tecModificationTimestamp) {
		this.tecModificationTimestamp = tecModificationTimestamp;
	}

	public String getTecModificationUser() {
		return tecModificationUser;
	}

	public void setTecModificationUser(String tecModificationUser) {
		this.tecModificationUser = tecModificationUser;
	}

	public Boolean getTecDeleted() {
		return tecDeleted;
	}

	public void setTecDeleted(Boolean tecDeleted) {
		this.tecDeleted = tecDeleted;
	}

	public Integer getManifestFreightFk() {
		return manifestFreightFk;
	}

	public void setManifestFreightFk(Integer manifestFreightFk) {
		this.manifestFreightFk = manifestFreightFk;
	}

	public String getManifestObservationFk() {
		return manifestObservationFk;
	}

	public void setManifestObservationFk(String manifestObservationFk) {
		this.manifestObservationFk = manifestObservationFk;
	}

	public java.util.Set<ManifestStHs> getManifestStHs() {
		return manifestStHs;
	}

	public void setManifestStHs(java.util.Set<ManifestStHs> manifestStHs) {
		this.manifestStHs = manifestStHs;
	}

	public void addManifestStHs(ManifestStHs manifestStHs) {
		this.manifestStHs.add(manifestStHs);
	}

	public void removeManifestStHs(ManifestStHs manifestStHs) {
		this.manifestStHs.remove(manifestStHs);
	}

	public java.util.Set<ManifestCouponFlown> getManifestCouponFlown() {
		return manifestCouponFlown;
	}

	public void setManifestCouponFlown(java.util.Set<ManifestCouponFlown> manifestCouponFlown) {
		this.manifestCouponFlown = manifestCouponFlown;
	}

	public void addManifestCouponFlown(ManifestCouponFlown manifestCouponFlown) {
		this.manifestCouponFlown.add(manifestCouponFlown);
	}

	public void removeManifestCouponFlown(ManifestCouponFlown manifestCouponFlown) {
		this.manifestCouponFlown.remove(manifestCouponFlown);
	}

	public FlightOperated getFlightOperated() {
		return flightOperated;
	}

	public void setFlightOperated(FlightOperated flightOperated) {
		this.flightOperated = flightOperated;
	}

	public ManifestTotal getManifestTotal() {
		return manifestTotal;
	}

	public void setManifestTotal(ManifestTotal manifestTotal) {
		this.manifestTotal = manifestTotal;
	}

	public ManifestSt getManifestSt() {
		return manifestSt;
	}

	public void setManifestSt(ManifestSt manifestSt) {
		this.manifestSt = manifestSt;
	}
}
